<!DOCTYPE html>
<html lang="en">

<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
    <style>
    div{
        width: 40rem;
    }
input{
    width: 20rem;
height: 80px; 
float: left;

}
button{
    /* width: 20rem; */
    height: 80px;
   
}

    </style>
</head>

<body>
    <!-- <div>
        <input type="text" name="hyb" value="何彦博" />

        <div></div>
        <input type="text" name="hyb" value="15" /><br />
        <input type="button" value="传参" id="transFun" onclick=chuancan() />
   </div> -->
   <div>
       <input type="text" > <button>搜索</button>
   </div>
</body>

</html>
<script>
    //  function  chuancan(){
    //             var arr = document.getElementsByName("hyb");
    //             for(var i=0;i<arr.length;i++){
    //                 alert(arr[i].value);                    
    //             }
    //         }

    const list = [1, 2, 3];
    const square = num => {
        return new Promise((resolve, reject) => {
            setTimeout(() => {
                resolve(num * num);
            }, 1000);
        });
    }
    function test() {
        list.forEach(async x => {
            const res = await square(x);
            console.log(res);
        });
    }
    test()
</script>
<style>

</style>